package ch09.shili;

import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;

public class S03_pre {

    public static void main(String[] args) throws UnsupportedEncodingException {
        //了解流
        String str = "accp中文";
        //int 4个字节
        //short 2个字节
        //byte 1个字节 8个位 描述256种情况
        byte[] arr = str.getBytes("utf-8");
        System.out.println(Arrays.toString(arr));

        byte[] arr2 = {-28, -72, -83, -26, -106, -121};
        String str2 = new String(arr2,"utf-8");
        System.out.println(str2);
    }
}
